//弹出自定义提示框
$('.toast-wrap').html('');
function toast(msg) {
    setTimeout(function() {
        $('.toast-wrap').html('<span class="toast-msg" ></span>');
        document.getElementsByClassName('toast-wrap')[0].getElementsByClassName('toast-msg')[0].innerHTML = msg;
        var toastTag = document.getElementsByClassName('toast-wrap')[0];
        toastTag.className = toastTag.className.replace('toastAnimate', '');
        setTimeout(function() {
            toastTag.className = toastTag.className + ' toastAnimate';
            setTimeout(function() {
                $('.toast-wrap').html('');
            }, 2000)

        }, 300);
    }, 300);

}
// 跨页面取参数只有一个参数
function getUrlParam() {
    var urlname=window.location.search;
    if (urlname.indexOf("?") != -1) {
        console.log(decodeURI(urlname.split('=')[1]));
        return decodeURI(urlname.split('=')[1]);
    }else {
        return null;
    }
}
var loading2=document.getElementById('loading2');
var loading1=document.getElementById('loading');

function loaddingOpen() {
    loading1.style.display='block';
    loading2.style.display='block';
}

function loaddingClose() {
    loading1.style.display='none';
    loading2.style.display='none';
}
// 键盘收起
function allinputclose() {
    var ainput1=document.getElementsByTagName('input');
    var ainput2=document.getElementsByTagName('textarea');
    for (var i=0;i<ainput1.length;i++) {
        ainput1[i].blur();
    }
    for (var j=0;j<ainput2.length;j++) {
        ainput2[j].blur();
    }

}

